VDGetDMADepths
TheVDGetDMADepths
function allows an application to determine which pixel depths a digitizer supports. This function is supported only by digitizers that support DMA (that is, theirdigiOutDoesDMA
output capability flag is set to 1).
pascal VideoDigitizerError VDGetDMADepths (VideoDigitizerComponent ci, long *depthArray, long *preferredDepth);
ci
- Identifies the application's connection to the video digitizer component. An application obtains this value from the Component Manager's
OpenComponent
function.depthArray
- Contains a pointer to a long integer. The video digitizer returns a value that indicates the depths it can support. Each depth is represented by a single bit in this field. More than one bit may be set to 1.
preferredDepth
- Contains a pointer to a long integer. Video digitizers that have a preferred depth value return that value in this field, using one of the possible values of the
depthArray
parameter. Digitizers that do not prefer any given value set this field to 0.DESCRIPTION
The flags returned by this function augment the information that an application can obtain from the digitizer's output capability flags in the digitizer information structure (see "Capability Flags" beginning on page 8-14 for more information). If a digitizer does not support this function but does support DMA, an application may assume that the digitizer can handle offscreen buffers at all of the depths indicated in its output capabilities flags.Before a program that uses a video digitizer creates an offscreen buffer, it should call the
VDGetDMADepths
function to determine the pixel depths supported by the digitizer. If possible, the program should use the preferred depth, in order to obtain the best possible display performance.Applications may use the following enumerators to set bits in the field referred to by the
depthArray
parameter.
enum { dmaDepth1 = 1, /* supports black and white */ dmaDepth2 = 2, /* supports 2-bit color */ dmaDepth4 = 4, /* supports 4-bit color */ dmaDepth8 = 8, /* supports 8-bit color */ dmaDepth16 = 16, /* supports 16-bit color */ dmaDepth32 = 32, /* supports 32-bit color */ dmaDepth2Gray = 64, /* supports 2-bit grayscale */ dmaDepth4Gray = 128,/* supports 4-bit grayscale */ dmaDepth8Gray = 256 /* supports 8-bit grayscale */ };RESULT CODES
noErr 0 No error digiUnimpErr -2201 Function not supported
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help